package cn.myjerry.sort.innerType;

/**
 * 排序规则的业务类
 * @author Administrator
 *
 */

public class StringComp implements java.util.Comparator<String> {
	
	/**
	 * 按长度比较大小
	 * 正数	>
	 * 负数	<
	 * 0	==
	 */
	@Override
	public int compare(String o1, String o2) {
		int len01 = o1.length();
		int len02 = o2.length();
		return len01 - len02;
	}

}
